package com.pig4cloud.pig.module.service.product;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.pig.common.core.exception.TransactionalException;
import com.pig4cloud.pig.common.mybatis.core.BaseService;
import com.pig4cloud.pig.module.api.entity.product.Product;

import java.util.Map;

/**
 * 商品Service接口
 *
 * @author ruoyi
 * @date 2021-08-11
 */
public interface IProductService extends BaseService<Product> {

	/**
	 *  编辑商品信息
	 * @param product
	 * @return
	 * @throws TransactionalException
	 */
	int addProduct(Product product) throws TransactionalException;

	/**
	 * 商品详情
	 * @param id 商品id
	 * @return ProductVo
	 */
	Product goodsDetail(Long id);


	/**
	 * 获取生成的属性
	 * @param id 商品id
	 * @param jsonStr jsonStr
	 * @return map
	 */
	Map<String,Object> getFormatAttr(Long id, String jsonStr, boolean isActivity,Integer isReset);

	/**+
	 * 删除商品转发海报
	 * @param id
	 */
	void deleteForwardImg(Long id);


	Page<Product> selectPageList(Page<Product> page, Map<String,Object> map);
}
